package tech.yunland.shop.domain.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.moyuer.bsf.domain.model.AbstractEntity;
import com.moyuer.bsf.domain.model.Attachment;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author: 袁首京<yuanshoujing@gmail.com>
 * 16/4/13
 */
@Entity
@Table(name = "goods_package_pictures")
public class GoodsPackagePictures extends AbstractEntity {

    @JSONField(serialize = false)
    @ManyToOne()
    @JoinColumn(name = "goods_package_id")
    private GoodsPackage goodsPackage;

    @ManyToOne
    private Attachment picture;

    public GoodsPackage getGoodsPackage() {
        return goodsPackage;
    }

    public void setGoodsPackage(GoodsPackage goodsPackage) {
        this.goodsPackage = goodsPackage;
    }

    public Attachment getPicture() {
        return picture;
    }

    public void setPicture(Attachment picture) {
        this.picture = picture;
    }
}
